package org.springblade.modules.admin.vo.plan.wx;

import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.codehaus.jettison.Convention;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zcc
 * @version 1.0
 * @date 2025/1/13 8:47
 */
@Data
public class BiWxPlanDetailVo {

	private Long planId;
	private Long elevatorId;
	private String provinceName;
	private String provinceCode;
	private String cityName;
	private String cityCode;
	private String adName;
	private String adCode;

	@ApiModelProperty("任务来源")
	private Integer planFrom;

	@ApiModelProperty("任务类型")
	private String planTypeName = "维修";

	@ApiModelProperty("报障状态")
	private Integer elevatorStop;

	@ApiModelProperty("当前电梯状态")
	private Integer nowElevatorStop;

	@ApiModelProperty("工单当前状态")
	private Integer status;


	@ApiModelProperty("电梯编号")
	private String privateNum;

	@ApiModelProperty("电梯地址")
	private String elevatorAddress;

	@ApiModelProperty("电梯责任人")
	private String principalUserNames;

	@ApiModelProperty("所属维保组")
	private String principalDeptNames;

	@ApiModelProperty("工单创建时间")
	private Date planCreateTime;

	@ApiModelProperty("调度时间")
	private Date allocateTime;


	@ApiModelProperty("第一次签到时间")
	private Date firstSignTime;


	@ApiModelProperty("最后一次签退时间")
	private Date endSignOutTime;

	@ApiModelProperty("调度人-计划执行人")
	private String planUserNames;

	@ApiModelProperty("预计路程距离")
	private String expectedDistance;


	@ApiModelProperty("预计达到时长(分)")
	private String planArriveMinute;

	@ApiModelProperty("实际达到耗时(小时)")
	private BigDecimal realArriveHour;

	@ApiModelProperty("实际执行人")
	private String realPlanUserNames;

	@ApiModelProperty("实际执行人数")
	private Integer realPlanUserNamesCounts;

	@ApiModelProperty("工单开始时间")
	private Date planBeginTime;

	@ApiModelProperty("工单完成时间")
	private Date finishPlanTime;


	@ApiModelProperty("作业工时(小时)")
	private BigDecimal workWHour;


	@ApiModelProperty("作业耗时(耗时)")
	private Integer workHHour;


	@ApiModelProperty("完成工时(小时)")
	private BigDecimal workAllHour;


	@ApiModelProperty("面向客户完成工时")
	private Integer clientWorkAllHour;


	@ApiModelProperty("项目id")
	private Long buildingId;


	@ApiModelProperty("项目id")
	private String buildingName;

	@ApiModelProperty("项目id")
	private String buildingType;

	@ApiModelProperty("项目要求达到时长")
	private String malfunctionWorkArrivalTime;


	public void setWorkWHour(BigDecimal workWHour) {
		if (workWHour != null) {
			this.workWHour = workWHour.divide(Convert.toBigDecimal(60),2,BigDecimal.ROUND_HALF_UP);
		} else {
			this.workWHour = workWHour;
		}
	}
}
